<template>
  <div>
      <TopBar>账户设置</TopBar>
      <p class="setRow vux-1px-tb" @click="jump(1)"  style="margin-top:1.5rem">修改密码
        <x-icon type="ios-arrow-right" size="30"></x-icon>
      </p>
      <p class="setRow vux-1px-b" @click="jump(2)">修改手机号
        <x-icon type="ios-arrow-right" size="30"></x-icon>
      </p>
      <div class="logout" @click="logoutBtn">退出</div>
  </div>
</template>
<script>
import TopBar from '../../component/common/TopBar'
import {removeStore,removeLStore, setStore} from '../../../config/mUtils.js'
import {getSDK} from '../../../service/wxShare.js'

export default {
  components:{
    TopBar,
  },
  beforeCreate(){
      getSDK()
    },
  data(){
    return {
      
    }
  },
  methods:{
    jump(type){
      switch(type){
        case 1:
          this.$router.push('/set/setPwd')
        break;
        case 2:
          this.$router.push('/set/setPhone')
        break;
      }
    },
    logoutBtn(){
      removeStore('loginkey')
      removeStore('phone')
      removeStore('pre')
      removeStore('pid')

      removeLStore('loginkey')
      removeLStore('phone')
      removeLStore('expiretime')

      this.$router.replace('/')
    }
  },
}
</script>
<style lang="less">
@import '../../../style/mixin.less';
  
.setRow{
  .wh(100%,1.2rem);
  // .bg(yellow);
  font-size: 0.4rem;
  line-height: 1.2rem;
  padding-left: 0.4rem;
  .vux-x-icon {
    fill: #ccc;
    float: right;
    margin-right: .8rem;
    margin-top: .2rem;
  }
}
.logout{
  .wh(90%,1rem);
  .sc(.44rem,#000);
  text-align:center;
  line-height:1rem;
  margin:0 auto;
  border:1px solid #aaa;
  .borderRadius(2rem);
  margin-top:9.2rem
}
</style>
